package com.bdd.controller;

import com.bdd.common.AjaxResponseResult;
import com.bdd.dto.IdentityDto;
import com.bdd.entities.Identity;
import com.bdd.service.IdentityService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author Bdd
 * @Description
 * @Date 2020/3/31 21:05
 */
@RestController
@RequestMapping("identity")
public class IdentityController {

    @Resource
    private IdentityService identityService;

    @PostMapping("auth")
    public AjaxResponseResult realNameAuth(@RequestBody IdentityDto identityDto){
        return identityService.realNameAuth(identityDto);
    }

//    ServerA通过Feign调用
    @PostMapping("save")
    public AjaxResponseResult save(@RequestBody IdentityDto identityDto){
        return identityService.save(identityDto);
    }
}
